﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace project2
{
    /// <summary>
    /// 抽象的运算基类
    /// </summary>
    public class Operation
    {
        //二个运算对象
        private double _numberA;
        private double _numberB;

        /// <summary>
        /// 运算数A
        /// </summary>
        public double NumberA
        {
            get { return _numberA; }
            set { _numberA = value; }
        }

        /// <summary>
        /// 运算数B
        /// </summary>
        public double NumberB
        {
            get { return _numberB; }
            set { _numberB = value; }
        }

        //获取运算结果，此处为虚方法，子类可以重写
        public virtual double GetResult()
        {
            return 0;
        }
    }
}
